<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_marginStart="@dimen/period_subject_margin"
    android:layout_marginEnd="@dimen/period_subject_margin"
    android:layout_marginBottom="@dimen/period_subject_margin">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="@dimen/period_subject_padding">

        <Button
            android:id="@+id/iconButton"
            style="?attr/materialIconButtonOutlinedStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
            app:icon="@drawable/ic_round_query_stats_24" />

        <TextView
            android:id="@+id/subjectName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_toStartOf="@id/iconButton"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="@string/placeholder_lesson_name"
            android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall" />

        <TextView
            android:id="@+id/subjectAverage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/subjectName"
            android:layout_alignParentStart="true"
            android:ellipsize="end"
            android:layout_toStartOf="@id/iconButton"
            android:maxLines="2"
            android:text="@string/placeholder_period_average"
            android:textAppearance="@style/TextAppearance.Material3.LabelLarge" />

        <TextView
            android:id="@+id/subjectWeighted"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/subjectAverage"
            android:layout_alignParentStart="true"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="@string/placeholder_period_weighted"
            android:textAppearance="@style/TextAppearance.Material3.LabelLarge"
            tools:visibility="gone" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/marksRecyclerView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/subjectWeighted"
            android:layout_alignParentStart="true"
            android:layout_alignParentEnd="true"
            android:ellipsize="none"
            android:fadingEdgeLength="40dp"
            android:requiresFadingEdge="horizontal"
            tools:itemCount="1" />

    </RelativeLayout>

</com.google.android.material.card.MaterialCardView>